//
//  CCViewModel.h
//  test02
//
//  Created by lzh on 2020/11/24.
//  Copyright © 2020 NO. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "JYBaseNode.h"
#import "JYNode.h"
NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, EJYCellSeparatorType) {
    EJYCellSeparatorTypeNone = 0,       // 没有分割线
    EJYCellSeparatorTypeSeparator = 1,  // 有分割线
    EJYCellSeparatorTypeHiddenLast = 2, // 隐藏最后分割线
    EJYCellSeparatorTypeCustom = 3,     // 根据UI要求统一定制的分割线
};

@interface CCViewModel : NSObject

-(void)addData;
- (NSInteger)numberOfSections;
- (NSInteger)numberOfRowsInSection:(NSInteger)section;

- (CGFloat)heightForRowAtIndexPath:(NSIndexPath *)indexPath;
- (CGFloat)heightForRowAtIndexPath:(NSIndexPath *)indexPath config:(void (^)(UITableViewCell *aCell,__kindof JYBaseNode* aNode))aConfig;// 自动计算高度可能要

// 如实现- (void)setCellContent:(id)aCellContent; 会走该方法
- (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath;
- (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath config:(void (^)(UITableViewCell *aCell,__kindof JYBaseNode* aNode))aConfig;

- (void)registCellNodes:(NSArray<JYBaseNode *> *)nodes byTableView:(UITableView *)tableView cellDelegate:(id)cellDelegate;

@end

NS_ASSUME_NONNULL_END
